// js将数字转换成万、亿、万亿
export function numberFormat (value) {
  let param = {}
  let k = 10000
  let sizes = ['', '万', '亿', '万亿']
  let i = 0
  if (value < k) {
    param.value = value
    param.unit = ''
  } else {
    i = Math.floor(Math.log(value) / Math.log(k))
    param.value = ((value / Math.pow(k, i))).toFixed(0)
    param.unit = sizes[i]
  }
  return `${param.value}<span style="font-size: 14px; margin-left: 5px">${param.unit}</span>`
}
